using System;
using System.Collections.Generic;
using XEvolve.Core.Runtime;
using XEvolve.Repository.Core;

namespace XEvolve.Repository.Test
{
    internal class StubEntity : IEntity
    {
        public Guid Id { get; set; }
        public int Version { get; set; }
        [SaveToRepository] public AnotherStubEntity EntityProperty { get; set; }
    }

    internal class AnotherStubEntity : IEntity
    {
        public Guid Id { get; set; }
        [SaveToRepository] public YetAnotherStubEntity EntityProperty { get; set; }
        [SaveToRepository] public YetAnotherStubEntity[] ArrayProperty { get; set; }
        [SaveToRepository] public IList<YetAnotherStubEntity> ListProperty { get; set; }
    }

    internal class YetAnotherStubEntity : IEntity
    {
        public Guid Id { get; set; }
    }

    internal class StubRepository : IRepository
    {
        public T Save<T>(T entity) where T : IEntity
        {
            throw new NotImplementedException();
        }

        public bool Delete<T>(T entity) where T : IEntity
        {
            throw new NotImplementedException();
        }

        public IEnumerable<T> Find<T>(Predicate<T> criteria) where T : IEntity
        {
            throw new NotImplementedException();
        }

        public void ClearAll()
        {
            throw new NotImplementedException();
        }

        public void Clear<T>()
        {
            throw new NotImplementedException();
        }
    }

    internal abstract class TestPlatform : Platform
    {
        public static Platform Create()
        {
            return CreateDefault();
        }
    }
}
